set(HAIRCORE_SOURCE_FILES src/DllExports.cpp src/HairMassSpringSimulator.cpp src/HairReader.cpp src/SDF.cpp src/HairDFTLSimulator.cpp src/HairBaseSimulator.cpp src/HairSelleSimulator.cpp src/HairInterpolationSimulator.cpp src/HairHelper.cpp src/HairAcceleratedSelleSimulator.cpp src/HairStictionSolver.cpp)
add_library(haircore STATIC ${HAIRCORE_SOURCE_FILES})

set(HAIRCORE_INCLUDE_DIRS ./include)
set(HAIRCORE_LIBRARIES)

find_package(EIGEN3 REQUIRED)
if (EIGEN3_FOUND)
    set(HAIRCORE_INCLUDE_DIRS ${HAIRCORE_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR})
endif (EIGEN3_FOUND)

find_package(TBB REQUIRED)
if (TBB_FOUND)
    set(HAIRCORE_INCLUDE_DIRS ${HAIRCORE_INCLUDE_DIRS} ${TBB_INCLUDE_DIR})
    set(HAIRCORE_LIBRARIES ${HAIRCORE_LIBRARIES} ${TBB_LIBRARY})
endif(TBB_FOUND)


target_include_directories(haircore PUBLIC ${HAIRCORE_INCLUDE_DIRS})
target_link_libraries(haircore ${HAIRCORE_LIBRARIES})
